I
IT Quicesa

Clients CRUD Dashboard

Blazor Clients Dashboard displays a searchable, paged client table with modal add/edit forms. Uses EditForm validation and a Tailwind CSS responsive layout for table and modal.

LIVE DEMO
Generated using Instruct UI - An AI for Blazor UI Generation
## What's implemented - Searchable client list with server-like filtering (client-side here). - Paged table with responsive columns and action buttons (Edit/Delete). - Modal Add/Edit form using EditForm with DataAnnotations validation and ValidationSummary. - Client-side confirmation dialog via JS interop for deletions. - Page size selector and simple Prev/Next pagination. ## Key components - EditForm, DataAnnotationsValidator, ValidationSummary, ValidationMessage - InputText, InputDate, InputNumber, InputCheckbox, InputTextArea - Table markup (HTML <table>) with @foreach rows and conditional empty state - @bind-Value bindings, event handlers (@onclick), and simple modal markup - ClientModel with DataAnnotations attributes (Required, EmailAddress, Range, StringLength) ## How it works - Data is seeded in OnInitialized and held in a local List<ClientModel>. - Filtering uses a computed property (filteredClients) that checks name and email. - Paging is implemented with Skip/Take over filteredClients and a pageSize bound to a <select>. - Modal editing clones the selected item into editingClient to avoid mutating the list until SaveClient runs. - SaveClient inserts or replaces the model in the clients list; DeleteClientAsync uses JS.InvokeAsync<bool>("confirm", ...) to ask for confirmation. - Validation uses DataAnnotationsValidator and ValidationMessage components tied to ClientModel attributes. ## Styling - Uses Tailwind CSS utility classes extensively (flex, grid, gap-*, px-*, py-*, text-*, hidden sm:table-cell, md:grid-cols-2, etc.). - Icons are rendered with Font Awesome classes (fas fa-...); include the Font Awesome CSS in the host page. - Modal is a simple fixed-position overlay implemented in Razor markup; responsiveness relies on Tailwind breakpoints. ## Reuse steps 1. Add a Blazor page/component and copy ClientsDashboard.razor and ClientModel.cs into the project. 2. Ensure Tailwind CSS (or equivalent utility CSS) is available in the layout and include Font Awesome for icons. 3. Confirm that _Imports.razor exposes Microsoft.AspNetCore.Components.Forms if needed. 4. Replace the in-memory List<ClientModel> with a service or API call; register and inject the service in Program.cs. 5. Keep DataAnnotations on the model and wire server-side validation if using an API. ## Limitations & next steps - This is a single-page UI with in-memory data; persistence, API integration, and authentication are not implemented. - No optimistic concurrency or server-side paging is present; large datasets require server paging and filtering. - Accessibility improvements (focus trap for modal, ARIA labels) and more robust confirmation/dialog components are recommended. - Consider extracting the table and modal into reusable components, adding sorting, column resizing, and unit tests.